package com.ss.android.article.base.feature.detail2.picgroup.view;

import android.app.Activity;
import android.view.View;

import com.ss.android.article.base.feature.detail.model.GalleryImageInfo;
import com.ss.android.article.base.feature.detail.view.SaveImageBottomDialog;
import com.ss.android.image.Image;

final class i implements View.OnLongClickListener {
    private final PictureDetailLayout.a b;
    private final int a;

    i(PictureDetailLayout.a arg1, int arg2) {
        this.b = arg1;
        this.a = arg2;

    }

    public final boolean onLongClick(View arg4) {
        GalleryImageInfo v0 = this.b.b(this.a);
        if(v0 != null && v0.subImage != null) {
            Image v0_1 = android.support.design.a.imageInfo2Image(v0.subImage);
            if(v0_1 != null) {
                PictureDetailLayout v1 = this.b.f;
                String v0_2 = v0_1.url;
                if(v1.f != null && !android.support.design.a.isTextEmpty(v0_2) && ((v1.f instanceof Activity))) {
                    new SaveImageBottomDialog(v1.f, v0_2).show();
                }
            }
        }

        return true;
    }
}

